package com.cgnpc.scp.achievement.service;

import com.cgnpc.cud.core.domain.AjaxResult;
import com.cgnpc.scp.achievement.mybatis.entity.Knowledge;
import com.cgnpc.scp.achievement.pojo.KnowledgeDetail;
import com.cgnpc.scp.achievement.pojo.SaveKnowledgeReq;
import com.cgnpc.scp.common.bean.CreateFileInfo;
import com.cgnpc.scp.common.bean.MyPageResult;
import com.cgnpc.scp.common.pojo.UserInfo;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Locale;

public interface KnowledgeService
{
    KnowledgeDetail save(SaveKnowledgeReq req);

    KnowledgeDetail queryKnowledgeDetailById(String id);

    MyPageResult<Knowledge> queryKnowledgePageList(Knowledge req);

    boolean delByIds(List<String> ids);

    <T extends Knowledge> CreateFileInfo exportExcel(T reqEntity) throws Exception;

    <T extends Knowledge> AjaxResult importFromExcel(UserInfo loginUserInfo, Locale reqLocale, MultipartFile reqFile) throws Exception;

    <T extends Knowledge> AjaxResult saveOrUpdate(UserInfo loginUserInfo, Locale reqLocale, List<T> reqEntityList);
}
